1. Field of the Invention
The present invention relates to data processing systems and, in particular, to object oriented programs. Still more particularly, the present invention provides a method, apparatus, and program to efficiently serialize objects.
2. Background of the Invention
When data is passed between a client and a server in a network, the data must be serialized. Serialization is a process of converting an object's state into a stream of bytes that can later be used to reconstruct an identical copy of the original object. Some data types, such as an integer or text string, are easily serializable. However, complex data must undergo a specific serialization process. When an objects is serialized into a string, the object class must also know how to turn that string to an instance of the object class.
There may be times when serialization of a complex object is not efficient. For example, a first server application may return a complex object to a client, which uses the complex object to invoke a second server application. However, the client may not know the structure of the object to deserialize the object upon receipt and serialize the object to send it back to the server. Furthermore, deserializing the object only to serialize the object and send it to the same server is inefficient.
Therefore, it would be advantageous to provide a more efficient way to serialize an object created by a server and used by a client.